Skip to content

refactor(sketch_db): extract data/ module for payload taxonomy - #177

Merged
zzylol merged 1 commit into
mainfrom
feat/sketch-db-reorg-1-data
May 13, 2026
Merged

zzylol merged 1 commit into
mainfrom
feat/sketch-db-reorg-1-data

Conversation

@zzylol

@zzylol zzylol commented May 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Post-M2.3 reorg #1 of 8. Moves stateless payload types out of store/mod.rs into a new sketch_db::data module. Split clarifies that:

  • data/ = stateless data taxonomy (payload kinds, sid hashing, accuracy derivation, capability re-exports)
  • store/ = stateful sid registry + per-sid columnar substrate

Moved to sketch_db::data:

  • AggKind enum
  • AggPayload enum
  • SketchConfig
  • SketchSampleState, SketchEncoding
  • SketchTimeSeries
  • AccuracyBound + from_config
  • compute_sid / compute_sketch_sid
  • canonical_parameters
  • Re-exports: Capability, SketchKindHandle, AggregationType

store/mod.rs re-exports each type at the legacy path (sketch_db::store::AggKind etc.) so no external caller needs to change spelling. The canonical home is now sketch_db::data::*.

Test plan

  • cargo test -p data_plane --lib — 783/783 pass.
  • cargo check --workspace clean.

🤖 Generated with Claude Code

Post-M2.3 reorg #1 of 8. Moves stateless payload types out of
`store/mod.rs` into a new `sketch_db::data` module. The split
clarifies that:

- `data/` = stateless data taxonomy (payload kinds, sid hashing,
  accuracy derivation, capability re-exports)
- `store/` = stateful sid registry + per-sid columnar substrate

Moved to `sketch_db::data`:

- `AggKind` enum (sketch-vs-precompute discriminator)
- `AggPayload` enum (sketch bytes vs accumulator)
- `SketchConfig` (per-variant tuning params)
- `SketchSampleState`, `SketchEncoding`
- `SketchTimeSeries` (read-side row shape)
- `AccuracyBound` + `from_config` derivation
- `compute_sid` / `compute_sketch_sid` (canonical sid hash)
- `canonical_parameters` helper
- Re-exports: `Capability`, `SketchKindHandle`, `AggregationType`

`store/mod.rs` re-exports each type at the legacy path
(`sketch_db::store::AggKind` etc.) so no external caller needs
to change spelling. The canonical home is now `sketch_db::data::*`.

783/783 lib tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@zzylol
zzylol merged commit fc5c2c4 into main May 13, 2026
@zzylol
zzylol deleted the feat/sketch-db-reorg-1-data branch July 17, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant